Carbon


GetCurrentThread

Header: Threads.h Carbon status: Supported

Obtains the thread ID of the currently executing thread.

OSErr GetCurrentThread (
    ThreadID *currentThreadID
);
Parameter descriptions
currentThreadID

On return, a pointer to the thread ID of the current thread.

function result

A result code. Δ

DISCUSSION

You can use the thread ID obtained by GetCurrentThread in functions such as GetThreadState and SetThreadState to get and set the state of a thread.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)